{include admin.inc.header}

{include admin.inc.top}

<div class="container-fluid content-body">
	<div class="main">
		{include admin.inc.menu}

		<section class="right-section" id="right-section">
			<!-- start of inner-frame -->
			<div class="inner-iframe">
				<ul class="breadcrumb">
					<li>
						<i class="glyphicon glyphicon-home"></i>
						<span>当前位置：</span>
						<a href="#">{$breadcrumb[0]}</a>
						<i class="glyphicon glyphicon-chevron-right"></i>
						<a href="#">{$breadcrumb[1]}</a>
					</li>
				</ul>

				<!-- Nav tabs -->
				<!-- Nav tabs -->
				<ul class="nav nav-tabs">
					<li><a href="{$add_url}"><i class="glyphicon glyphicon-plus"></i> 会员注册</a></li>
					<li><a href="{$index_url}"><i class="glyphicon glyphicon-th-list"></i> 会员列表</a></li>
					<li class="active"><a href="javascript:void(0);"><i class="glyphicon glyphicon-edit"></i> 企业会员认证审核</a></li>
				</ul>

				<div class="inner-container">

					<form role="form" class="content-add-form form-horizontal" id="content-add-form" autocomplete="off">

						<div class="form-group">
							<label class="col-sm-2 control-label"><span class="asterisk">*</span> 法定代表人</label>
							<div class="col-sm-10">
								<input type="text" name="company[legal_person]" value="{$company[legal_person]}" class="form-control" placeholder="法定代表人" required />
								<p class="help-block"></p>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label"><span class="asterisk">*</span> 法定代表人手机</label>
							<div class="col-sm-10">
								<input type="text" name="company[mobile]" value="{$company[mobile]}" dtype="mobile"  class="form-control" placeholder="法定代表人手机" required />
								<p class="help-block"></p>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label"><span class="asterisk">*</span> 法人身份证</label>
							<div class="col-sm-10">
								<div class="form-inline">
									<input type="text" name="company[idcard_no]" value="{$company[idcard_no]}" dtype="idnum"  class="form-control" placeholder="法人身份证" required />
									<span class="icon-group">
										<i class="glyphicon glyphicon-open jupload" title="上传"></i>
										<input type="hidden" name="company[idcard_positive]" empty-message="请上传身份证正面" value="{$company[idcard_positive]}" required>
										<i class="glyphicon glyphicon-picture img-view" data-src="{$company[idcard_positive]}" title="预览"></i>
										<span style="margin-right: 20px; margin-left: 10px;">正面照</span>
										<i class="glyphicon glyphicon-open jupload"  title="上传"></i>
										<input type="hidden" name="company[idcard_opposite]" empty-message="请上传身份证背面" value="{$company[idcard_opposite]}" required>
										<i class="glyphicon glyphicon-picture img-view" data-src="{$company[idcard_opposite]}" title="预览"></i>
										<span style="margin-right: 20px; margin-left: 10px;">背面照</span>
									</span>

								</div>
								<p class="help-block"></p>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label"><span class="asterisk">*</span> 公司名称</label>
							<div class="col-sm-10">
								<input type="text" name="company[company]" value="{$company[company]}" class="form-control" placeholder="公司名称" required />
								<p class="help-block"></p>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label"><span class="asterisk">*</span> 证书</label>
							<div class="col-sm-10">
								<div>
									<label class="icheck-label"><input type="radio" name="company[three_in_one]" value="0" class="icheck" {if $company[three_in_one]==0}checked{/if}> 企业三证</label>
									<label class="icheck-label"><input type="radio" name="company[three_in_one]" value="1" class="icheck" {if $company[three_in_one]==1}checked{/if} id="three_in_one"> 三证合一</label>
								</div>
								<p class="help-block"></p>
							</div>
						</div>


						<div class="form-group">
							<label class="col-sm-2 control-label"><span class="asterisk">*</span> 营业执照</label>
							<div class="col-sm-10">
								<div class="form-inline">
									<input type="text" name="company[license]" value="{$company[license]}" class="form-control" placeholder="营业执照" required />
									<span class="icon-group">
										<i class="glyphicon glyphicon-open jupload" title="上传"></i>
										<input type="hidden" name="company[license_pic]" empty-message="请上传营业执照" value="{$company[license_pic]}" required>
										<i class="glyphicon glyphicon-picture img-view" data-src="{$company[license_pic]}" title="预览"></i>
									</span>

								</div>
								<p class="help-block"></p>
							</div>
						</div>

						<div class="form-group" {if $company[three_in_one]==1}style="display: none"{/if} id="taxno">
							<label class="col-sm-2 control-label"><span class="asterisk">*</span> 税务登记号</label>
							<div class="col-sm-10">
								<div class="form-inline">
									<input type="text" name="company[taxno]" value="{$company[taxno]}"  class="form-control" placeholder="税务登记号" />
									<span class="icon-group">
										<i class="glyphicon glyphicon-open jupload" title="上传"></i>
										<input type="hidden" name="company[taxno_pic]" empty-message="请上传税务登记证明" value="{$company[taxno_pic]}">
										<i class="glyphicon glyphicon-picture img-view" data-src="{$company[taxno_pic]}" title="预览"></i>
									</span>

								</div>
								<p class="help-block"></p>
							</div>
						</div>

						<div class="form-group" {if $company[three_in_one]==1}style="display: none"{/if} id="orgcode">
							<label class="col-sm-2 control-label"><span class="asterisk">*</span> 组织机构代码证</label>
							<div class="col-sm-10">
								<div class="form-inline">
									<input type="text" name="company[orgcode]" value="{$company[orgcode]}"  class="form-control" placeholder="组织机构代码证" />
									<span class="icon-group">
										<i class="glyphicon glyphicon-open jupload" title="上传"></i>
										<input type="hidden" name="company[orgcode_pic]" empty-message="请上传组织机构代码证" value="{$company[orgcode_pic]}">
										<i class="glyphicon glyphicon-picture img-view" data-src="{$company[orgcode_pic]}" title="预览"></i>
									</span>

								</div>
								<p class="help-block"></p>
							</div>
						</div>

						<input type="hidden" name="id" value="{$item[id]}">
						<!-- 默认审核通过 -->
						<input type="hidden" name="user[ischecked]" value="2">
						<input type="hidden" name="usertype" value="2">

						<div class="form-group">

							<div class="col-sm-offset-2 col-sm-10">
								{if $company[ischecked] > 1}
								<h3><span class="label label-danger">该会员已经审核， 请不要重复审核.</span></h3>
								{else}
								<a href="/admin/user/doCheck/" class="btn btn-success ajaxproxy" id="check-btn"
								   proxy='{"method":"post", "location":"{$index_url}"}'><i class="glyphicon glyphicon-ok"></i> 审核通过</a>
								<a href="#" class="btn btn-danger" id="uncheck-btn"><i class="glyphicon glyphicon-ban-circle"></i> 审核不通过</a>
								{/if}
							</div>
						</div>

					</form>

				</div><!-- end of inner container -->

			</div><!-- end of inner frame-->

		</section>

	</div>
</div>

{include admin.inc.footer}

<script type="text/html" id="user-check-template">

	<form role="form" id="user-check-form" autocomplete="off">

		<div class="form-element">
			<div class="form-group">
				<label><span class="asterisk">*</span> 请输入审核不通过的原因，以便客户了解。</label>
				<textarea class="form-control" min-length="5" maxlength="100" id="check-note" cname="审核原因备注" required>{$item[check_note]}</textarea>
			</div>
			<p class="help-block">请输入5-100个字符</p>
		</div>
	</form>

</script>

<script>
	seajs.use("user", function(exports) {
		exports.init({
			prov : '{$company[prov]}',
			city : '{$company[city]}',
			dist : '{$company[dist]}',
		});
		exports.upload();

		exports.check({});
	});
</script>
</body>
</html>
